def hanoi(n,a,b,c):
    if n > 0:
        hanoi(n-1,a,c,b)
        print(f'move {a} to {c}')
        hanoi(n-1,b,a,c)
    return
hanoi(3,'A','B','C')